import http from "@/api";

import { ModuleFlexJobUrl, ModuleCommonUrl } from "..";

const moduleUrl = ModuleFlexJobUrl;
const commModuleUrl = ModuleCommonUrl;
// /* 查看需要支付的金额
export const getJobbillApi = (params: { id: string, invoiceType: number }) => {
  return http.post(moduleUrl + `/jobapi/jobbill`, params);
};

// * 确认支付
export const handleJobPayApi = (params: { id: string, invoiceType: number }) => {
  return http.post(moduleUrl + `/jobapi/jobpay`, params);
};

// /* 合并支付，获取每个的支付明细
export const getJobsbillApi = (params: { jobIds: string[], invoiceType: number }) => {
  return http.post(moduleUrl + `/jobapi/jobsbill`, params);
};

// * 合并支付，支付
export const handleJobsPayApi = (params: { jobIds: string, invoiceType: number }) => {
  return http.post(moduleUrl + `/jobapi/jobspay`, params);
};

// /* 获取线下支付提醒信息
export const getPayResultConfigInfoApi = () => {
  return http.post(commModuleUrl + `/comapi/config`, { configKey: "DEFAULT_OFF_LINE_PAY" });
};
